
#ifndef Velyn_Point4_h
#define Velyn_Point4_h

namespace Velyn {
    
    namespace Object {
        
        /*
         * Specifies a point4 for a vertex.
         *
         * @author n7down
         */
        class Point4 {
            
        public:
            
            union {
                float _v[4];
                struct {
                    float r, g, b, a;
                };
            };
            
            void set(const float r, const float g, const float b, const float a) {
                _v[0] = r; _v[1] = g; _v[2] = b; _v[3] = a;
            }
            
            void set(const Point4 p) {
                _v[0] = p._v[0]; _v[1] = p._v[1]; _v[2] = p._v[2];
            }
            
            const float* get() const {
                return _v;
            }
            
            void print() {
                std::cout << "[ " << _v[0] << " " << _v[1] << " " << _v[2] << " " << _v[3] << " ]\n";
            }
        };
    }
}

#endif
